let { $, table, layer, form } = layui;
export default class Delete {
    constructor(data) {
        this.render();
        this.handle(data);
    }
    render() {
    
    }
    handle(data) {
        layer.confirm(`您确认想要删除记录吗？`, function (index) {
    
            //向服务端发送删除指令
            $.ajax({
              type: "delete",
              url: "/hotShow/" + data._id,
              data: {
                id: data._id
              },
              success() {
                layer.close(index);
                table.reload("soonsTable", {
                  where: {}
                })
              }
            })
            console.log(data._id);
          });
               
                
    }
}

